<html>
<head>
    <title>class选择器</title>
    <style type="text/css">
        .red{
            color: red;
            font-size:20px;
        }
        .green{
            color: green;
            font-size:20px;
        }
    </style>

</head>
<body>
    <p class="red">class选择器1</p>
    <p class="green">class选择器2</p>
    <h3 class="green">h3同样适用</h3>
</body>
</html>